import request from '@/utils/request';
export const getDevicTypeCounts = (params) =>
  request.get('/ledger/busAccount/getDevicTypeCounts', { params: { ...params } });
export const getDeviceClassifyCounts = () => request.get('/ledger/busAccount/getDeviceClassifyCounts');
export const getSafeDay = () => request.get('/ledger/busAccount/getSafeDay');
export const tree = (params) => request.post('/ledger/busAccount/tree', { ...params });
// export const listPage = (body) => request.post('/api/ledger/busAccountAttr/listPage', body);
export const listPage = (params) => request.post('/ledger/busAccountAttr/listPage', { ...params });
export const buslistPage = (params) => request.post('/ledger/busLoadStatisticsInfo/listPage', { ...params });
export const getDevicePointAttrGroup = (params) =>
  request.get('/ledger/busDevicePointConfig/getDevicePointAttrGroup', { params: { ...params } });
export const getDevicePointDetail = (params) =>
  request.post('/ledger/busDevicePointConfig/getDevicePointDetail', { ...params });
export const gisAnalysislistPage = (params) => request.post('/ledger/gisAnalysis/listPage', { ...params });
export const getVedioTree = (params) => request.post('/ledger/busVideoNvr/getVedioTree', { ...params });
export const realTimeStream = (params) => request.post('/ledger/camera-ctrl-rest/realTimeStream', { ...params });
export const busDeviceAlarmInfo = (params) => request.post('/ledger/busDeviceAlarmInfo/listPage', { ...params });
export const busVideo = (params) => request.post('/ledger/busVideo/listPage', { ...params });
export const getDeviceAlarm = (params) =>
  request.get('/ledger/busDeviceAlarmInfo/getDeviceAlarm', { params: { ...params } });
export const getVideoClassifyCounts = (params) =>
  request.post('/ledger/busVideo/getVideoClassifyCounts', { ...params });
export const busAccount = (params) => request.post('/ledger/busAccount/listPage', { ...params });
export const exportData = (params) => {
  const headers = {
    'Content-Type': 'application/json' // 根据实际需要设置正确的Content-Type
  };

  return request.post('/ledger/busDeviceAlarmInfo/exportData', { ...params }, { headers });
};
export const getCurveInfo = (params) => request.post('/ledger/busSignalCurveInfo/getCurveInfo', { ...params });

export const deleteById = (params) => request.get('/ledger/gisAnalysis/deleteById', { params: { ...params } });
// export const exportData = (params) => request.post('/ledger/busDeviceAlarmInfo/exportData', { ...params });
export const getCountByClassify = (params) =>
  request.get('/ledger/busDeviceAlarmInfo/getCountByClassify', { params: { ...params } });
export const getAdjunctDevicAlarm = (params) =>
  request.get('/ledger/busDeviceAlarmInfo/getAdjunctDevicAlarm', { params: { ...params } });
